/* 修仙游戏 - 主题样式 */
:root {
  --primary-color: #d4af37; /* 金色 */
  --secondary-color: #1a1a2e;
  --accent-color: #9d4edd;
  --text-color: #f0f0f0;
  --background-color: #0a0a1a;
  --card-background: rgba(26, 26, 46, 0.8);
  --border-color: rgba(212, 175, 55, 0.5);
  --button-background: linear-gradient(135deg, #d4af37, #b8860b);
  --button-hover: linear-gradient(135deg, #e5c100, #cd950c);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Ma Shan Zheng', cursive, 'Microsoft YaHei', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 80% 30%, rgba(157, 78, 221, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 30% 70%, rgba(212, 175, 55, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(157, 78, 221, 0.03) 0%, transparent 30%);
  min-height: 100vh;
}

#root {
  width: 100%;
  min-height: 100vh;
}

/* 主容器 */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* 登录和注册界面样式 */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 30px;
  width: 100%;
  max-width: 400px;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.form-group input {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.error-message {
  background-color: #fee;
  color: #c33;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 14px;
  text-align: center;
}

.auth-button {
  background: linear-gradient(135deg, var(--primary-color), #b8860b);
  color: #0a0a1a;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.auth-button:active:not(:disabled) {
  transform: translateY(0);
}

.auth-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-link {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: #666;
}

.auth-link span {
  color: var(--accent-color);
  cursor: pointer;
  font-weight: 500;
}

.auth-link span:hover {
  text-decoration: underline;
}

/* 注册成功提示样式 */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.success-message {
  background: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  color: #333;
}

.success-message h3 {
  margin: 0 0 10px;
  color: #28a745;
}

/* 头部样式 */
.game-header {
  padding: 2rem 1rem;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.9), transparent);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.game-header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
  letter-spacing: 2px;
}

.game-header p {
  font-size: 1.2rem;
  color: rgba(240, 240, 240, 0.8);
}

.logout-button {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 78, 80, 0.8);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.logout-button:hover {
  background: rgba(255, 78, 80, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 78, 80, 0.3);
}

/* 主内容区域 */
.game-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

/* 开始游戏界面 */
.start-screen {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 3rem;
  text-align: center;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.input-group {
  margin-bottom: 2rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.input-group input {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: rgba(10, 10, 26, 0.5);
  color: var(--text-color);
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* 游戏主界面 */
.game-screen {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

/* 角色信息 */
.character-info {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.character-info h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-item {
  padding: 0.8rem;
  background-color: rgba(10, 10, 26, 0.3);
  border-radius: 5px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-label {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* 游戏消息 */
.game-message {
  background-color: rgba(10, 10, 26, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  min-height: 80px;
  text-align: center;
}

/* 按钮样式 */
.start-button, .action-button {
  font-family: inherit;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: var(--button-background);
  color: #0a0a1a;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.start-button:hover, .action-button:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.start-button:active, .action-button:active {
  transform: translateY(0);
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

/* 游戏控制区域 */
.game-controls {
  margin-top: 2rem;
  text-align: center;
}

/* 重新开始按钮 */
.restart-button {
  font-family: inherit;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  color: var(--primary-color);
  font-weight: bold;
  transition: all 0.3s ease;
}

.restart-button:hover {
  background: var(--primary-color);
  color: #0a0a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.restart-button:active {
  transform: translateY(0);
}

.restart-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 底部样式 */
.game-footer {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(0deg, rgba(26, 26, 46, 0.9), transparent);
  border-top: 1px solid var(--border-color);
  color: rgba(240, 240, 240, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .game-header h1 {
    font-size: 2.2rem;
  }
  
  .game-main {
    padding: 1rem;
  }
  
  .stats, .action-buttons {
    grid-template-columns: 1fr;
  }
  
  .start-screen, .game-screen {
    padding: 1.5rem;
  }
}
